/**
 * <p>
 * Created on 2006-4-17 13:48:26 <br>
 * Copyright (c) 2006, All rights reserved.
 * </p>
 * @author Widen
 */
package com.widen.prima.editor.finance;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;

import com.widen.prima.Messages;

public class BookOfAccountInputInput
    implements IEditorInput
{
    private String editorName;

    public BookOfAccountInputInput()
    {
        super();
        this.editorName = Messages.getString("BookOfAccountInputInput.boa.input"); //$NON-NLS-1$
        Assert.isNotNull(editorName);
    }

    public boolean exists()
    {
        return false;
    }

    public ImageDescriptor getImageDescriptor()
    {
        return null;
    }

    public String getName()
    {
        return editorName;
    }

    public IPersistableElement getPersistable()
    {
        return null;
    }

    public String getToolTipText()
    {
        return editorName;
    }

    public Object getAdapter(Class adapter)
    {
        return null;
    }

    public boolean equals(Object obj)
    {
        if (super.equals(obj))
            return true;
        if (!(obj instanceof BookOfAccountInputInput))
            return false;
        BookOfAccountInputInput other = (BookOfAccountInputInput) obj;
        return editorName.equals(other.editorName);
    }

    public int hashCode()
    {
        return editorName.hashCode();
    }

}
